package org.yaaic.activity;

import org.yaaic.R;
import org.yaaic.adapter.ServerListAdapter;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ListView;

public class FindNearbyActivity extends Activity
{

    private ListView list;
    private ServerListAdapter adapter;

    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.findnearby);

        /*
        adapter = new ServerListAdapter();
        setListAdapter(adapter);

        list = getListView();
        //        list.setOnItemLongClickListener(this);
        //        list.setBackgroundDrawable(new NonScalingBackgroundDrawable(this, list, R.drawable.background));

         */


    }

    /**
    @Override
    protected void onListItemClick(ListView l, View v, int position, long id) {

        Server server = adapter.getItem(position);

        if (server == null) {
            // "Add server" was selected
            //            startActivityForResult(new Intent(this, AddServerActivity.class), 0);
            return;
        }

        Intent intent = new Intent(this, ConversationActivity.class);

        if (server.getStatus() == Status.DISCONNECTED && !server.mayReconnect()) {
            server.setStatus(Status.PRE_CONNECTING);
            intent.putExtra("connect", true);
        }

        intent.putExtra("serverId", server.getId());
        startActivity(intent);

    }

     */
}
